﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BizCollegeWebApp.Models
{
    public partial class QuestionAnswer
    {
        public void SetSelected(string option)
        {
            SelectedOptions enumOption = SelectedOptions.IsASelected;
            Enum.TryParse(option, out enumOption);
            switch (enumOption)
            {
                case SelectedOptions.IsASelected:
                    IsASelected = true;
                    break;
                case SelectedOptions.IsBSelected:
                    IsBSelected = true;
                    break;
                case SelectedOptions.IsCSelected:
                    IsCSelected = true;
                    break;
                case SelectedOptions.IsDSelected:
                    IsDSelected = true;
                    break;
                case SelectedOptions.IsESelected:
                    IsESelected = true;
                    break;
            }
        }
    }
}